<?php include("session.php") ?>
<?php require_once("../module/function_global.php");?>
<?php
    require_once("../ketnoi_csdl.php");
    $sql="SELECT ID_ALBUM,NAME_ALBUM, PATH_ALBUM, URL_ALBUM, DESCRIPTION FROM album ORDER BY CREATEDAY DESC LIMIT 5";
    $result = mysql_query($sql,$con);
    while($list_file[] = mysql_fetch_array($result));
    $numfile = count($list_file)-1;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0041)http://www.ewebvn.com/demo/div-three-col/ -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>Wedding studio</title>
    <script src="../../source/smartpaginator/jquery-1.4.4.min.js" type="text/javascript"></script>
    <script src="../../source/smartpaginator/smartpaginator.js" type="text/javascript"></script>
    <link href="../../source/smartpaginator/smartpaginator.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="../../source/resizeimg/jquery.nailthumb.1.1.css" type="text/css" />
    <script type="text/javascript" src="../../source/resizeimg/jquery.nailthumb.1.1.js"></script>
                                    
		<!-- We only want the thunbnails to display when javascript is disabled -->
	<script type="text/javascript">
		document.write('<style>.noscript { display: none; }</style>');
	</script>
    <style type="text/css" media="screen">
                .square {
                    width: 215px;
                    height: 175px;
                }
                .showlink {
                    width: 690px;
                    height: 500px;
            }
    </style>
    <script type="text/javascript">
        $(document).ready(function () {
            $('#green').smartpaginator({ totalrecords: <?php echo ceil($numfile/4);?>, recordsperpage: 3, datacontainer: 'mt', dataelement: 'tr', initval: 0, next: 'Next', prev: 'Prev', first: 'First', last: 'Last', theme: 'green' });

            $('#black').smartpaginator({ totalrecords: 5, recordsperpage: 1, datacontainer: 'divs', dataelement: 'div', initval: 0, next: 'Next', prev: 'Prev', first: 'First', last: 'Last', theme: 'black' });

            $('#red').smartpaginator({ totalrecords: 32, recordsperpage: 4, length: 4, next: 'Next', prev: 'Prev', first: 'First', last: 'Last', theme: 'red', controlsalways: true, onchange: function (newPage) {
                $('#r').html('Page # ' + newPage);
            }
            });

        });
    </script>  

    <style type="text/css">
        #wrapper
        {
            margin: auto;
            width: 800px;
        }
        .contents
        {
            width: 91%; /*height: 150px;*/
            margin: 0;
        }
        .contents > p
        {
            padding: 8px;
        }
        .table
        {
            width: 100%;
            border-right: solid 1px #5f9000;
        }
        .table th, .table td
        {
            width: 16%;
            height: 20px;
            padding: 4px;
            text-align: left;
        }
        .table th
        {
            border-left: solid 1px #5f9000;
        }
        .table td
        {
            border-left: solid 1px #5f9000;
            border-bottom: solid 1px #5f9000;
        }
        .header
        {
            background-color: #4f7305;
            color: White;
        }
        #divs
        {
            margin: 0;
            height: 200px;
            font: verdana;
            font-size: 14px;
            background-color: White;
        }
        #divs > div
        {
            width: 98%;
            padding: 8px;
        }
        #divs > div p
        {
            width: 95%;
            padding: 8px;
        }
        #container
        {
            width: 100%;
            border: solid 1px red;
        }
    </style>
</head>
<body>
<?php include("header_admin.php"); ?>
</head>
<body>
	<div id="mainWap">
        <div id="green-contents" class="contents" style="border: solid 1px #5f9000;">
            <table id="mt" cellpadding="0" cellspacing="0" border="0" class="table">
                <tr class="header">
                    <th>
                    </th>
                    <th>
                    </th>
                    <th>
                    </th>
                    <th>
                    </th>
                </tr>
                <script>
                    function deletedata(id,path)
                    {
                        var xmlhttp;    
                        if (id=="")
                          {
                              document.getElementById("Display").innerHTML="";
                              return;
                          }
                        if (window.XMLHttpRequest)
                          {// code for IE7+, Firefox, Chrome, Opera, Safari
                              xmlhttp=new XMLHttpRequest();
                          }
                        else
                        {// code for IE6, IE5
                              xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
                        }
                        xmlhttp.onreadystatechange=function(e)
                        {
                              if (xmlhttp.readyState==4 && xmlhttp.status==200)
                              {
                                var response = xmlhttp.responseText;
                                if(response==true){
                                    alert("Xóa album thành công");
                                }
                                window.location.reload()
                    
                              }
                        }
                            xmlhttp.open("GET","../module/deletealbumwedding.php?userid="+id + "&dir="+path,true);
                            xmlhttp.send();
                    
                    }
                    </script> 
                    
                <?php
                    
                    PrintAlbumWeddingDelete($numfile,$list_file);                
                ?>                
            </table>
            <div id="green" style="margin: auto;">
            </div>
        </div>
    </div>
</body>




<?php include("footer_admin.php"); ?>
    <!-- end wapper -->

<div style="display:none" id="addthis-extension-script"></div></body><div style="display: none; " id="k1XKb07LtFf3qXDHOv7u5v1C" class="kzlzuwUwKPAvDYR3E7uqB8"></div><div style="display: none; " id="YV8CLCODDDq0pfWQ4qijEZEt_" class="kzlzuwUwKPAvDYR3E7uqB8"></div><div style="display: none; " id="kWRY8_3uCTQWbN_sjCoSQjlEqp" class="kzlzuwUwKPAvDYR3E7uqB8"></div></html>